package com.leizhou.dao;

/**
 * @author LT
 * @version 1.0.0
 * @ClassName AccountDao.java
 * @Description TODO
 * @createTime 2020年04月29日 10:13:00
 */

import com.leizhou.pojo.Accunt;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AccountDao {

    /***
     * 集合查询
     * @return
     */
    @Select("select * from account1")
    List<Accunt> list();

    /***
     * 增加测试
     * @param accunt
     * @return
     */
    @Insert("INSERT INTO account1(NAME,money)VALUES('桃子哥', '300')")
    int add(Accunt accunt);

    @Delete("DELETE FROM account1 WHERE money<300")
    int delete(Accunt accunt);


}
